import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import VueSetupExtend from 'vite-plugin-vue-setup-extend'
import Pages from 'vite-plugin-pages'

// https://vitejs.dev/config/
export default defineConfig({
  base: '/my-ui/',
  plugins: [
    vue(),
    VueSetupExtend(),
    Pages({
      extensions: ['vue'],
      exclude: ['**/components/*.vue', 'PC/**/*.vue', 'Mobile/**/*.vue'],
    }),
  ],
  resolve: {
    alias: {
      '@': '/src',
    },
  },
  optimizeDeps: {
    include: [
      'vue',
      'vue-router',
      'element-plus',
      'vant',
      'echarts',
      '@antv/g6',
      '@element-plus/icons-vue',
    ],
  },
})
